/*
 * @Author: kongfanqiang
 * @Email: 1260470885@qq.com
 * @Date: 2021-03-14 16:56:48
 * @LastEditTime: 2021-03-15 17:43:08
 * @Description: 配置文件
 */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); //生成html文件

module.exports = {
  mode: 'development',
  entry: './main.js',
  output: {
    filename: 'main.js',
    path: path.resolve(__dirname, 'dist'),
  },
  	//插件项
	plugins: [
		new HtmlWebpackPlugin({
			template: './index.html', // 引用的html模版
			inject: 'body', //资源引入的位置，默认是body
			hash: false, //如果是true，会给所有包含的script和css添加一个唯一的webpack编译hash值
			xhtml: false
    })
  ]
};